package com.robotlab.easytranslate.util;

import org.json.JSONException;
import org.json.JSONObject;

public class PicUtil {
    public static String handleOnePicResponse(String response){
/*        try {
            JSONObject jsonObject = new JSONObject(response);
            JSONArray jsonArray = jsonObject.getJSONArray("note");
            String content = jsonArray.getJSONArray(0).toString();
            return new Gson().fromJson(content, OneWord.class);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;*/
        try {
            JSONObject jsonObject = new JSONObject(response);
            String pic = jsonObject.getString("picture2");
            return pic;
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return null;
    }
}
